﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SD.Business;

namespace SD.Web.Iteration1.Contacts
{
    public partial class ListContact : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void btnCreateContact_Click(object sender, EventArgs e)
        {
            Response.Redirect("AddContact.aspx");
        }


        protected void btnEdit_Click(object sender, EventArgs e)
        {
            if (Request.Form["MyRadioButton"] != null)
            {
                // get value of radio button
                int contactId = Convert.ToInt32(Request.Form["MyRadioButton"].ToString());
                Response.Redirect("EditContact.aspx?id=" + contactId);
            }
        }

    }
}